package com.wzy.service;

import com.wzy.entity.Province;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wzy.util.Pager;
import javassist.NotFoundException;

import java.util.List;

/**
 * <p>
 * 服务类，
 * </p>
 *
 * @author wzy
 * @since 2021-02-09
 */
public interface ProvinceService extends IService<Province> {

    public int append(Province province);

    public boolean remove(Long provinceId);

    public int updateProvince(Long provinceId, Province province) throws NotFoundException;

    public int modifyProvinceName(Long provinceId ,String provinceName);

    public Province getProvinceByName(String provinceName);

    /**
     * 根据id查询省份
     *
     * @param provinceId
     * @return 省份对象
     */
    public Province detail(Long provinceId);

    /**
     * 查询省份列表
     *
     * @param page
     * @return省份列表
     */
    public Pager<Province> list(Integer page);

    /**
     * 查询每个单独省份下博客数量
     *
     * @return
     */
    public List<Province> list();

}
